<!--签证办理,办理流程-->
<template>
    <div class="process-flow">
        <div class="process-header_box">
            <p>办理流程</p>
        </div>
        <div class="process-list">
            <!-- <el-steps direction="vertical" :active="1">
                <el-step />
                <el-step />
                <el-step />
            </el-steps> -->
            <div class="process-item" v-for="(item, index) of list" :key="index">
                <div class="process-step">
                    <el-icon><arrow-down /></el-icon>
                </div>
                <div class="process-body">
                    <p class="item-title">{{ item.title }}</p>
                    <p class="item-desc">{{ item.content }}</p>
                </div>
            </div>
        </div>
    </div>
</template>
<script>import { ref, watch } from "vue"

export default {
    props: {
        state: {
            type: Array,
            default: []
        }
    },
    setup(props, { emit }) {
        let list = ref([])
        watch(() => props.state, (newVal, oldVal) => {
            console.log(newVal)
            list.value = newVal
            console.log(list.value)
        })
        return { list }
    }
}
</script>
<style lang="less" scoped>
.process-flow {
    border-radius: 2px;
    background-color: #fff;
    min-height: 300px;
    box-shadow: 0 2px 8px 0 rgb(0 0 0 / 6%);
    background: #fff;
    border-radius: 2px;
    margin-top: 12px;
    .process-header_box {
        padding: 12px;
        border-bottom: 1px solid #e8e8e8;
        p {
            font-size: 20px;
            font-weight: 600;
        }
    }
    .process-list {
        padding: 15px;
        .process-item {
            padding: 0 0 8px 20px;
            z-index: 1;
            position: relative;
            .process-step{
                position: absolute;
                left: 2px;
                top: 10px;
                z-index: 2;
                width: 25px;
                height: 27px;
            }
            .process-body {
                padding: 12px 16px;
                border-radius: 2px;
                background: linear-gradient(270deg, #fff, #fafbfc);
                .item-title {
                    font-size: 16px;
                    margin-bottom: 8px;
                    color: #2f333d;
                }
                .item-desc {
                    font-size: 14px;
                    color: #5f666e;
                    line-height: 18px;
                }
            }
        }
        .process-item:after {
            content:"";
            position: absolute;
            left: 10px;
            bottom: -10px;
            z-index: -1;
            width: 1px;
            opacity: 0.16;
            background-color: #599fff;
            top: 15px;
        }
    }
}
</style>